# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Blogger.V3.Model.Page do
  @moduledoc """


  ## Attributes

  *   `author` (*type:* `GoogleApi.Blogger.V3.Model.PageAuthor.t`, *default:* `nil`) - The author of this Page.
  *   `blog` (*type:* `GoogleApi.Blogger.V3.Model.PageBlog.t`, *default:* `nil`) - Data about the blog containing this Page.
  *   `content` (*type:* `String.t`, *default:* `nil`) - The body content of this Page, in HTML.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Etag of the resource.
  *   `id` (*type:* `String.t`, *default:* `nil`) - The identifier for this resource.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - The kind of this entity. Always blogger#page.
  *   `published` (*type:* `String.t`, *default:* `nil`) - RFC 3339 date-time when this Page was published.
  *   `selfLink` (*type:* `String.t`, *default:* `nil`) - The API REST URL to fetch this resource from.
  *   `status` (*type:* `String.t`, *default:* `nil`) - The status of the page for admin resources (either LIVE or DRAFT).
  *   `title` (*type:* `String.t`, *default:* `nil`) - The title of this entity. This is the name displayed in the Admin user interface.
  *   `trashed` (*type:* `String.t`, *default:* `nil`) - RFC 3339 date-time when this Page was trashed.
  *   `updated` (*type:* `String.t`, *default:* `nil`) - RFC 3339 date-time when this Page was last updated.
  *   `url` (*type:* `String.t`, *default:* `nil`) - The URL that this Page is displayed at.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :author => GoogleApi.Blogger.V3.Model.PageAuthor.t() | nil,
          :blog => GoogleApi.Blogger.V3.Model.PageBlog.t() | nil,
          :content => String.t() | nil,
          :etag => String.t() | nil,
          :id => String.t() | nil,
          :kind => String.t() | nil,
          :published => String.t() | nil,
          :selfLink => String.t() | nil,
          :status => String.t() | nil,
          :title => String.t() | nil,
          :trashed => String.t() | nil,
          :updated => String.t() | nil,
          :url => String.t() | nil
        }

  field(:author, as: GoogleApi.Blogger.V3.Model.PageAuthor)
  field(:blog, as: GoogleApi.Blogger.V3.Model.PageBlog)
  field(:content)
  field(:etag)
  field(:id)
  field(:kind)
  field(:published)
  field(:selfLink)
  field(:status)
  field(:title)
  field(:trashed)
  field(:updated)
  field(:url)
end

defimpl Poison.Decoder, for: GoogleApi.Blogger.V3.Model.Page do
  def decode(value, options) do
    GoogleApi.Blogger.V3.Model.Page.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Blogger.V3.Model.Page do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
